package com.ticket.sass.common.entity.tenant;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ywb
 * @since 2022-09-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("halls")
@ApiModel(value="HallEntity对象")
public class HallEntity implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    @ApiModelProperty(value = "影厅名")
    private String name;
    
    @ApiModelProperty(value = "影厅编码")
    private String code;
    
    @ApiModelProperty(value = "座位数", example = "0")
    private Integer seatCount;
    
    private Long cinemaId;
    
    @ApiModelProperty(value = "租户 id")
    private Long tenantId;
    
    @ApiModelProperty(value = "同步时间")
    private LocalDateTime syncTime;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    public LocalDateTime createdAt;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    public LocalDateTime updatedAt;
    
    @TableField(select = false)
    @ApiModelProperty(value = "删除时间")
    @TableLogic(value = "null", delval = "now()")
    public LocalDateTime deletedAt;
    
    @ApiModelProperty(value = "影院名称")
    @TableField(value = "cinema_name", exist = false)
    private String cinemaName;
    
    @ApiModelProperty(value = "影院国标码")
    @TableField(value = "cinema_zz_code", exist = false)
    private String cinemaGbCode;
    
    @TableField(exist = false)
    private Long priceSchemeId;

    @TableField(exist = false)
    private CommodityDispatchHallEntity commodityDispatchHall;
}
